import { Link, NavLink } from "react-router-dom";

export default function Home() {
  return (
    <div>
      <h2>Home</h2>

      <hr />

      <NavLink
        to="/about"
        className={({ isPending }) => {
          console.log("isPending", isPending);
          // 返回类名
          return isPending ? "pending" : "";
        }}
      >
        go About
      </NavLink>
    </div>
  );
}
